package com.lyf.practice.exception;

import com.lyf.practice.domain.ResponseRs;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @AUTHOR LYF
 * @DATE 2022/5/24
 * @VERSION 1.0
 * @DESC
 */
@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(Exception.class)
    ResponseRs exceptionHandle(Exception e){
        System.out.println(e.getMessage()+"{{}}");
        ResponseRs rs = new ResponseRs();
        return rs;
    }
}
